Skip to content

Merge dev → main: wallet docs + base-URL centralization (production deploy)#87

Merged
jab3z merged 151 commits into
mainfrom
dev
Jun 10, 2026
Merged

Merge dev → main: wallet docs + base-URL centralization (production deploy)#87
jab3z merged 151 commits into
mainfrom
dev

Conversation

@suliman-ottu

@suliman-ottu suliman-ottu commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

What this merges

Syncs devmain (production, docs.ottu.com). The bulk is the accumulated wallet documentation (business + developer guides, Wallet API reference, interactive WalletDemo, reconciliation, refund-to-wallet), the inline themed SVG diagram migration, native-payments updates, and SDK version bumps. Plus a final base-URL centralization pass (head commit) addressing the question below.

⚠️ Production impact — environment flip (read this)

main currently points the site's interactive demos at sandbox.ottu.net (the old SANDBOX_MERCHANT_ID). After this merge, every demo and most code samples on docs.ottu.com will target ksa.ottu.dev instead.

This is intentional and required: ksa.ottu.dev is the only environment that hosts the full public API surface + the wallet service. sandbox.ottu.net has no wallet PG, so it cannot back the WalletDemo or any wallet sample. The new dev code already commits to this via ACTIVE_CONNECT = KSA and OTTU_CONNECT_BASE_URL.

"No hardcoded hosts" — investigation result

The host is already centralized into single sources of truth on dev:

Concern Single source of truth
Interactive demos (Checkout / Recurring / Wallet / PaymentJourney) ACTIVE_CONNECTsrc/utils/sandbox.ts
Code samples (rendered curl/JSON) OTTU_CONNECT_BASE_URLsrc/constants/api.ts
Auto-generated API reference sandboxUrlstatic/api-enrichments/_variables.yaml
Wallet-seed backend KSA_OTTU_DEVmcp-server/config.mjs

The head commit routes the last stragglers that bypassed those constants:

  • reports.mdx, psq.mdx, invoices.mdx — interpolate OTTU_CONNECT_BASE_URL in the curl / response examples
  • wallet/index.mdx — render the "Base URL" note from the constant
  • payment-methods.md (a .md file, can't import) — use the existing <ottu-url> placeholder convention
  • sandbox.ts — corrected the ACTIVE_CONNECT comment, which previously prescribed "main → SANDBOX" (the trap that would break wallet in production)

Intentionally kept (not hardcoding bugs):

  • merchant_id: 'ksa.ottu.dev' in checkout-sdk/web.mdx — the mandated canonical demo merchant id (each line already says // use your merchant id)
  • "shared sandbox" prose in api-fundamentals.md — deliberately names which host the shared sandbox is

How to manage going forward

There is now genuinely one line to change to retarget the whole site: ACTIVE_CONNECT in src/utils/sandbox.ts (+ the matching OTTU_CONNECT_BASE_URL). True per-branch / per-deploy switching (build-time env override) is supported by the design but premature — wallet pins us to ksa.ottu.dev until a production-grade sandbox also hosts wallet.

Verification

  • npm run build passes; the constant interpolates to the real host in the rendered HTML (no leaked ${OTTU_CONNECT_BASE_URL} literals).
  • Merge is a clean fast-forward (main is an ancestor of dev, 0 divergent commits).
  • Remaining build warnings are pre-existing broken links/anchors (onBrokenLinks: 'warn'), unrelated to these changes.

🤖 Generated with Claude Code

suliman-ottu and others added 30 commits April 29, 2026 23:08
…ates

Documents Ottu's four core payment objects (PaymentTransaction,
PaymentAttempt, Payment Request, E-commerce Payment) at the top of both
the developer Payment States page and the merchant Transaction States
page. Each term links to its full glossary entry, and a Hierarchy
subsection visualises the parent/child relationship and the type
discriminator with Mermaid diagrams. The merchant page also gets a note
disambiguating "Child Transaction" (an operation-created record) from
"PaymentAttempt" (a single gateway-level try) so the existing
Parent/Child terminology on that page does not clash with the new
object model.
…sary terms

Adds three new glossary entries (PaymentTransaction with PaymentTransaction
alias, PaymentAttempt with PaymentAttempt alias, and E-commerce Payment) and
updates the existing Payment Request definition to clearly distinguish it as
a merchant-initiated PaymentTransaction subtype. Gives merchants and
developers a single canonical source for the four core payment objects and
the relationships between them.
Set order_no and session_id as the default body example for
POST /b/pbl/v2/inquiry/ so the interactive API explorer
pre-fills both supported identifiers.
Extended the existing example for POST /b/pbl/v2/message-notification/
to include session_id and order_no alongside channels, showing both
supported transaction identifiers in the interactive API explorer.
The shared basic_auth_create_checkout permission block linked Payment
Request and E-Commerce to /developers/payments/payment-methods/#enabling-the-plugin,
an anchor that does not exist on the Payment Methods page. Repointed
both links to the corresponding plugin documentation pages
(/business/plugins/payment-request and /business/plugins/e-commerce),
which is what readers actually want when they click a permission name.
Regenerated the affected Create Payment Transaction API docs.
Previously, the format/type override branch silently skipped when a
property didn't exist in the schema. Now it emits a warn() consistent
with the description branch behavior, making stale enrichment overlays
visible during the build.
The previous implementation only encoded spaces as %20, leaving other
special characters (#, &, +, /) unencoded. Now uses encodeURIComponent
and selectively decodes safe characters (/, ,, @, :) that are commonly
used in real API values and don't need percent-encoding.
…r usage

Add a console.warn when an enrichment overlay sets an example value that
isn't present in the enum, making spec drift visible in devtools rather
than silently discarding the pre-fill. Also refactor to use exampleStr
consistently throughout the component instead of re-stringifying example
at each use site.
- bump SDK version to 2.2.2 in install snippet
- add Prepayment Hook section explaining CardVerificationResult flow and payload contents
- document verifyPayment and payButtonText as optional init properties
- add cornerRadius to Button theme properties
- add paymentItemCornerRadius and paymentItemBorderColor to payment item theming
- reword successCallback/errorCallback/cancelCallback description to match SDK reference
- bump SDK version to 2.2.5 in both Swift Package Manager and CocoaPods install snippets
- add Prepayment Hook section with Swift CardVerificationResult example and payload notes
- document verifyPayment and payButtonText as optional init properties
- add cornerRadius to ButtonComponent theme properties
- add selectPaymentMethodCornerRadius and selectPaymentMethodBorderColor to payment item theming
- refine delegate property description to match SDK reference wording
- bump SDK version to 2.2.2 for both git ref and CocoaPods release variant
- add Prepayment Hook section with Dart CardVerificationResult example and payload notes
- document verifyPayment and payButtonText as optional init properties
- add cornerRadius to ButtonComponent theme properties
- add paymentItemCornerRadius and paymentItemBorderColor to payment item theming
…SDK doc

- point verifyPayment "See ... chapter for details" link to Prepayment Hook instead of Full Example
- realign Payment Item theme table column widths and remove trailing blank line
…y descriptions

- rewrite verifyPayment description across Android, iOS, Flutter to use consistent wording
- fix "allowing set" → "that allows setting" in payButtonText on Android and iOS
- add missing backticks on VerifyPaymentDelegate, PayButtonText, en, ar in iOS doc
Applies to Android, iOS, and Flutter SDK docs.
- add missing article: 'prepayment hook' → 'a prepayment hook' (Android, iOS, Flutter)
- simplify phrasing: 'before processing with the payment' → 'before payment processing' (all 3)
- add missing 'that' in Flutter payButtonText description
- add CGFloat data type for selectPaymentMethodCornerRadius in iOS theme table
- fix iOS localization file reference: res/values/strings.xml → Localizable.strings
- bold displaySettings, verifyPayment, payButtonText headings to match Android/Flutter style
- fix CardVerificationResult method casing: Success/Failure → success/failure (Swift convention)
Document the onsite checkout flow that renders Ottu's card form inline via
the Jazz SDK. Adds 'jazz' to the formsOfPayment enumeration, a new top-level
Onsite Checkout section covering enablement and the customer flow, and
cross-references from the existing on-site mention under Callbacks and from
the beforePayment Card Data Structure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
farhan-t-ottu and others added 28 commits May 18, 2026 17:18
153887 ::  update refund process documentation with new images and steps
…ve wallet reconciliation flow

Refund to wallet no longer requires wallet_code — callers send
destination: "wallet" directly. Removes wallet_code from operations
docs, the Operation schema enrichment, and the raw API spec, and
regenerates the API reference. Also drops the native wallet (express
checkout) Flow C from the business wallet reconciliation docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
153887  :: update: replace accounts listing image in wallet documenta…
…location

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
docs(wallet): add merchant reconciliation section to business wallet …
- New "Wallet details in payment webhooks" subsection under Guide,
  linking to the customer_wallet_transactions field on the webhook
  reference page so developers can reconcile stacked-wallet payments
  without polling.
- Restored "Can I charge a wallet without the Checkout SDK?" FAQ with
  a corrected answer (SDK-only today; no mention of One-Step Checkout).
- New FAQ "How do I know which wallet(s) were charged for a payment?"
  mirroring the new section's anchor for search-landing readers.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…on section, scope ledger/accounts examples

- Add "Reconciling a wallet payment" section to the wallet developer
  page documenting the customer_wallet_transactions object, its fields,
  and how merchants use them for reconciliation and system updates
- Mark customer_wallet_transactions optional in DirectPaymentResponse
  and make all CustomerWalletTransaction fields optional (the array is
  omitted entirely when no wallet is involved)
- Add WalletAccountsRequest / WalletEntriesRequest enrichment overlays
  scoping the API explorer examples to customer_id sandbox-usd / USD
- Regenerate affected API reference docs

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… API namespace

Move accounts/entries/operations endpoints from /checkout/v1/wallet/ to
/wallet/ottu/v1/. Pure path move - bodies, methods, auth, status codes
unchanged. Finalization-status endpoint stays under Checkout API.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	docs/developers/payments/wallet/index.mdx
150388 :: docs(wallet): relocate wallet endpoints to dedicated Wallet API namespace
153887 :: update funds auto release screenshot
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a warning on the developer Wallet page step 2 explaining that a
checkout creation request is rejected with HTTP 400 when two or more
selected payment gateways carry a wallet from the same provider usable
for the transaction currency, with a sample request and 400 response.
Add a brief cross-reference on the business Wallet page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bump SDK versions: Android 2.2.4, iOS 2.2.8, Flutter 2.2.5
…emed SVG

- Add the `svg-diagram` skill (.claude/skills/svg-diagram): hand-built,
  brand-styled, theme-aware inline SVG diagrams (Poppins, monochrome + #0B82BE
  accent) with inline-svg.py (scope + id-uniquify + [data-theme] overrides).
- Add the <Diagram> component (src/components/Diagram) that renders an SVG
  inline so it inherits the page's Poppins and switches light/dark instantly.
- Migrate the architecture, wallet, and recurring-payments diagrams from
  Mermaid/ThemedImage to single inline SVGs (src/diagrams/*); remove the old
  two-file *-light/-dark.svg assets.
- Fix recurring-payments workflow accuracy (customer uses the checkout page,
  not the API; Ottu processes + sends the async CIT webhook; MIT returns the
  result directly) and rename the MIT charge API to "Native Payments API".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rvices

Explain how merchants build their Google Pay / Apple Pay requests using the
values Ottu returns in sdk_setup_preload_payload.payment_services[], matched
by flow / pg_code. Adds per-wallet mapping tables and a prominent callout on
the gateway_merchant_id vs wallet merchant_id distinction (the cause of MPGS
"not authorized to use this Google Pay payment token" rejections).

Apple Pay fields verified against the live SDK serializer: its entry uses a
different field set (amount, domain, shop_name, session_id, validation_url)
and exposes no gateway/gateway_merchant_id/environment, so that is flagged
explicitly rather than assumed to mirror Google Pay.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs(native-payments): document wallet config from session payment_services
Eliminate the last hardcoded `https://ksa.ottu.dev` base URLs in code
samples that bypassed the centralized config, so every sample, demo, and
response example resolves the host from one place.

- reports.mdx, psq.mdx, invoices.mdx: interpolate OTTU_CONNECT_BASE_URL
  in the curl / response examples instead of the literal host
- wallet/index.mdx: render the "Base URL" note from the constant
- payment-methods.md (.md — can't import): use the <ottu-url> placeholder,
  matching the existing checkout-api.mdx / reports.mdx convention
- sandbox.ts: fix the ACTIVE_CONNECT comment — it prescribed "main →
  SANDBOX", which breaks wallet (sandbox.ottu.net has no wallet PG). Both
  branches use KSA until a prod-grade sandbox also hosts wallet.

Intentionally kept: the demo `merchant_id: 'ksa.ottu.dev'` in
checkout-sdk/web.mdx (mandated canonical demo merchant, each already
flagged "use your merchant id") and the "shared sandbox" prose in
api-fundamentals.md (deliberately names the env).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jab3z jab3z changed the title Dev Merge dev → main: wallet docs + base-URL centralization (production deploy) Jun 10, 2026
@jab3z jab3z merged commit f208b76 into main Jun 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants